1. Field
The present disclosure relates generally to data processing and desktop maintenance systems, and more particularly, to a system and method for managing a path environment variable in an operating system of a data processing system.
2. Description of the Related Art
The Windows™ operating system PATH is an environment string that contains a long list of file system directory paths. When launching any program in a conventional data processing or computer system, the Windows™ operating system searches all directories in the PATH environment variable string to find the requested program. There is a USER and SYSTEM PATH each of which can be, depending on the Windows™ version, up to 1024 chars in length. When a program search is done, the two PATHs are concatenated and searched as one. Long PATHs will slow down program execution. Additionally, there is the chance of running out of PATH space during installation of a program. This will prevent the program from installing.
Older or poorly written Windows™ application uninstall programs, even after they have removed all of their files, tend to leave behind entries in the Windows™ PATH environment variable string. The directories left behind no longer exist on the file system so they not only slow down program loading but can contribute to the problem of running out of PATH space.
During install program testing, developers and testers install and uninstall programs many times changing the install locations as they test. The install program typically leaves behind many directories, resulting in clogged PATHs. Eventually, the install program would fail due to lack of space in the PATH environment variable string.
Path maintenance is currently done in the Windows™ Environment Variable dialog. The directory strings are concatenated and separated by a semi-colon making it unreadable and difficult to maintain. To illustrate the awkward interface used in Windows™ to maintain program PATH information, FIG. 1 is a screenshot of the Windows XP System Properties dialog 100 further expanded to show the Environment Variable lists 102 for User and System variables and the Edit System Variable dialog 104, which contains the System PATH, edit field. Due to its layout, the PATH string 106 is hard to edit and extremely error prone due to the hand editing required. The user must horizontally scroll through a standard single line edit field 106, where the directories are delimited by semi-colons. Directories are manually removed by deleting character by character until the delimiting semi-colon is found. This can lead to mistakes that can cause programs to no longer function.
Therefore, a need exists for techniques to allow computer users, e.g., testers/developers, to view PATHs in a more user-friendly way and to determine which PATHs actually exist on a file system of a data processing or computer system. Furthermore, techniques are needed to facilitate computer system maintenance and for deleting obsolete directories.